/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package invitation;

import dao.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author tomasz
 */
@Controller
public class ViewInvitation {
    
    private Account account;
    
    private dao.Firma firma;
    
    @Autowired
    public void setFirma(dao.Firma firma){
        this.firma = firma;
    }
    
    @Autowired
    public void setAccount(Account account){
        this.account = account;
    }
    
    @RequestMapping("/view/invitation.htm/{id}")
    public String ViewInvitation(ModelMap model_map, @PathVariable Integer id)
    {
        
        model.Firma firma = this.firma.findFirmaId(id);
        model_map.addAttribute("firma", firma);
        return "invitation/view_invitation";
        
    }
    
}
